package com.define.ssh.dao.impl;

import org.springframework.stereotype.Repository;

import com.define.ssh.dao.RoleFuncDao;
import com.define.ssh.model.RoleFunc;

@Repository("roleFuncDaoImpl")
public class RoleFuncDaoImpl extends BaseDaoImpl<RoleFunc, Long> implements
		RoleFuncDao {

	/***
	 * 删除该角色 对应的权限
	 * 
	 * @param role_id
	 */
	@Override
	public void delRoleFuncByRoleId(Long role_id) {
		String hql = "delete RoleFunc rf where 1=1 ";
		hql += " and rf.role.id='" + role_id + "'";
		getSession().createQuery(hql).executeUpdate();
	}
}
